<style lang="scss" scoped src="./test-b.component.scss"></style>
<template>
	<div class="container-test-b">
		<div class="name-test-b">
			test-b component
		</div>
		<button class="send-btn" @click="send()">发送</button>
	</div>
</template>
<script lang="ts">
import { defineComponent, inject } from 'vue';
import type { InnerMqService } from '@/app/rx/service/inner-mq.service';
import { Topic } from '@/app/rx/topic';

export default defineComponent({
	name: 'app-test-b',
	setup() {
		const innerMqService = inject('innerMqService') as InnerMqService;
		return {
			innerMqService,
		}
	},
	methods: {
		send(): void {
			this.innerMqService.pub(Topic.MY_TP_1, '来自test-b的消息');
		}
	}
});
</script>
